package task15;

import java.util.Scanner;

/**
 * @author banana
 * 求m到n的之间的偶数和
 */
public class Task2_15_2 {
    public static void main(String[] args) {
        System.out.println("请输入两个数");
        Scanner scanner=new Scanner(System.in);
        int m=scanner.nextInt();
        int n=scanner.nextInt();
        int result=max(m,n);
        System.out.println("最大值是："+result);
        int sum=0;
        for(int i=result;i>=n;i--){
            if(i%2==0){
                sum+=i;
            }
        }
        System.out.println("mn之间的偶数和"+sum);
    }

    private static int max(int m, int n) {
        int max=m>n?m:n;
        return max;
    }

}
